<template>
  <view class="">
    <view
      @click="jump(item)"
      class="cms-item animate__animated animate__backInRight animate__faster"
      v-for="(item, index) in list"
      :key="index"
    >
      <view class="cms-title ellipsis2">{{ item.news_title }}</view>
      <view class="cms-time">发布时间：{{ item.news_time_text }}</view>

      <!-- <image class="cover flex-grow-0" src="http://cdn.liqunonline.cn/temp/202295/0.jpg" mode=""></image> -->
    </view>
  </view>
</template>

<script setup>
  defineOptions({
    name: 'CmsList',
  });

  const props = defineProps({
    list: {
      type: Array,
      default: () => [],
    },
  });

  const jump = (item) => {
    uni.navigateTo({
      url: '/pages/cms/detail?id=' + item.news_id,
    });
  };
</script>

<style lang="scss" scoped>
  .cms-item {
    padding: 30rpx 0;
    margin: 0 30rpx;
    border-bottom: 2rpx solid #ececec;

    .cms-title {
      font-family: PingFangSC, PingFang SC;
      font-weight: 400;
      font-size: 32rpx;
      color: #000000;
      line-height: 42rpx;
      text-align: left;
      font-style: normal;
    }

    .cms-time {
      margin-top: 20rpx;
      font-family: PingFangSC, PingFang SC;
      font-weight: 400;
      font-size: 24rpx;
      color: #797979;
      line-height: 34rpx;
      text-align: left;
      font-style: normal;
    }

    .cover {
      width: 200rpx;
      height: 150rpx;
      border-radius: 16rpx;
      margin-left: 20rpx;
    }
  }
  // @media (prefers-color-scheme: dark) {
  // 	.cms-item{border-bottom: 1px solid #434244;}
  // }
</style>
